package com.yao.sys.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.yao.common.enums.business.sys.SexEnum;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户表
 *
 * @author autoCode
 * @version 1.0.0-SNAPSHOT
 * @date 2020-04-09
 */
@Data
public class UserEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 有效状态0-有效
     */
    @TableField(value = "`status`", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_EMPTY)
    private Byte status;
    /**
     * 账户id
     */
    @TableField(value = "`accountId`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private Integer accountId;
    /**
     * 用户名
     */
    @TableField(value = "`userName`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private String userName;
    /**
     * 用户登陆密码
     */
    @TableField(value = "`password`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private String password;
    /**
     * 性别 1-女 2-男
     */
    @TableField(value = "`sex`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private SexEnum sex;
    /**
     * 身份证号
     */
    @TableField(value = "`idCard`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private String idCard;
    /**
     * 手机号
     */
    @TableField(value = "`phone`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private String phone;

    /**
     * token令牌
     */
    @TableField(value = "`accessToken`")
    private String accessToken;

    /**
     * 排序
     */
    @TableField(value = "`sort`", updateStrategy = FieldStrategy.NOT_EMPTY)
    private Integer sort;
    /**
     * 创建时间
     */
    @TableField(value = "`createTime`", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @TableField(value = "`updateTime`", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}